require(["../conf/config.js"], function() {
	require(["jquery", "swiper", "change"], function($, Swiper, aa) {
		$(function() {
			$("footer").load("foot.html"); //引入头部

			
			//以下为轮播图
			var Swip = new Swiper('#swiper1', {
				autoplay: true,
				navigation: {
					nextEl: '.swiper-button-next',
					prevEl: '.swiper-button-prev'
				},
				loop: true,
				effect: 'fade',
				fadeEffect: {
					crossFade: true
				},
				autoplay: {
					delay: 3000
				}
			})

			$(".box1").hover(function() {
				$(this).css({
					color: "#1428a0"
				})
			}, function() {
				$(this).css({
					color: "#000"
				})
			})
			$("a.trans").hover(function() {
				$(this).css({
					"border-bottom": "3px solid #000",
					"box-sizing": "border-box"
				})
			}, function() {
				$(this).css({
					"border-bottom": "none"
				})
			}) //swiper插件结束
			//轮播样式

			//进度条动画
			$("div.swiper-wrapper").hover(function() {
				$("span.icon-icon-up").css({
					"display": "block",
				})
				$("span.icon-zantingtingzhi").css({
					"display": "none",
				})
				clearInterval($(this).t)
			}, function() {
				$(this).t = setInterval(function() {
					$("div.hide").animate({
						width: "125px"
					});
				}, 3000)
				$("span.icon-icon-up").css({
					"display": "none"
				})
				$("span.icon-zantingtingzhi").css({
					"display": "block"
				})
			})
			//进度条进度

			//span点击事件
			$("header").load("head.html"); //引入底部

			//又是轮播图啊,第二个了还有一个哎
			$("div.title").find("a").click(function() {
				$(this).css({
					"color": "#000",
					"border-bottom": "4px solid #000"
				})
				$(this).parent().siblings().find("a").css({
					"color": "#949494",
					"border": "none"
				})
			})

			$("div.sure").find("a").hover(function() {
				$(this).find("div").animate({
					"bottom": "30px"
				}, 500);
			}, function() {
				$(this).find("div").animate({
					"bottom": "10px"
				}, 500);
			})

			$("div.title").find("a").click(function() {
				let s = function isTrue() {
					let a = ($("div.also").find("ul").index()) - ($("div.title").find("a").index());
					return a;
				};
				console.log(s);
				if (s) {
					let s = Math.abs(s);
					$("div.also").find("ul").animate({
						left: 1519.2 * s
					});
				}
			})

			aa("a.also_i_2", "src", "../status/ban/ban3.PNG", "../status/ban/ban2.PNG", "img");
			aa("a.also_i_3", "src", "../status/ban/ban2.PNG", "../status/ban/ban3.PNG", "img");
			aa("a.also_i_4", "src", "../status/ban/ban5.PNG", "../status/ban/ban4.PNG", "img");
			aa("a.also_i_5", "src", "../status/ban/ban4.PNG", "../status/ban/ban5.PNG", "img");

			aa("a.also_i_6", "src", "../status/ban/ban10.PNG", "../status/ban/ban6.PNG", "img");
			aa("a.also_i_8", "src", "../status/ban/ban9.PNG", "../status/ban/ban8.PNG", "img");
			aa("a.also_i_9", "src", "../status/ban/ban6.PNG", "../status/ban/ban9.PNG", "img");
			aa("a.also_i_10", "src", "../status/ban/ban8.PNG", "../status/ban/ban10.PNG", "img");

			 aa("a.also_i_11","src","../status/ban/ban12.PNG","../status/ban/ban11.PNG","img");
			 aa("a.also_i_12","src","../status/ban/ban14.PNG","../status/ban/ban12.PNG","img");
			 aa("a.also_i_13","src","../status/ban/ban11.PNG","../status/ban/ban13.PNG","img");
			 aa("a.also_i_14","src","../status/ban/ban13.PNG","../status/ban/ban14.PNG","img");

			$("div._search").focus(function() {
				console.log(111)
				$("this").find("input").css({
					"border": "1px solid #2f89d7"
				})
			})
			$("div._search").blur(function() {
				console.log(333)
				$("this").find("input").css({
					"border": "none"
				})
			})

			//第三个轮播图
			var swiper = new Swiper('#swiper2', {
				slidesPerView: 1,
				//spaceBetween: 30,
				loop: true,
				navigation: {
					nextEl: '.swiper-button-next',
					prevEl: '.swiper-button-prev',
				},
			});
		})
	})
})
